package assetrions {

	/**
	 * ...
	 * @author Loka
	 */
	public class Assert {
	
		
		public function Assert() {
			
		}
		
		public static function assertNotNull(o:Object):void {
			if (!o) {
				throw new AssertionError("objec is a null");
			}
		}
		
		static public function assertNumEquals(value:Number, expectedValue:Number):void {
			if (value != expectedValue) {
				var msg:String = "value: " + value + " is not equals to expected value: " + expectedValue;
				throw new AssertionError(msg);
			}
		}

		public static function assertTrue(b:Boolean, what:String="boolean value"):void {
			if(!b){
				var msg:String = "value: "+what+" [" + b+ "] is not a true";
				throw new AssertionError(msg);
			}
		}

		public static function assertFalse(b:Boolean, what:String="booleavn value"):void {
			if(b){
				var msg:String = "value: "+what+" [" + b+ "] is not a false";
				throw new AssertionError(msg);
			}
		}

	}

}